/* $Id: AddArtistAction.java,v 1.7 2008/01/09 14:32:08 gigabass Exp $
 *
 * Copyright (c) Guido Ludwig. All rights reserved.
 * Use is subject to license terms.
 */
package de.guidoludwig.jtm.client.shows;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import de.guidoludwig.af.AFProperties;
import de.guidoludwig.jtm.domain.Show;
import de.guidoludwig.jtm.server.ShowRepository;


/**
 * Action to add an artist to the tradelist
 *
 * @author <a href="mailto:jtrade@gigabss.de">Guido Ludwig</a>
 * @version $Revision: 1.7 $
 */
public class AddShowAction extends AbstractAction {

	private static final long serialVersionUID = 1L;

	private static final AFProperties PROPERTIES = new AFProperties(AddShowAction.class);

	private static final String TOOLTIP = "action.add.show.tooltip";
	private static final String ICON = "action.add.show.icon";
	private static final String ADD_NAME = "action.add.show.name";

	public AddShowAction() {
		super(PROPERTIES.getString(ADD_NAME), PROPERTIES.getIcon(ICON));
		putValue(Action.SHORT_DESCRIPTION, PROPERTIES.getString(TOOLTIP));
	}


	@Override
	public void actionPerformed(ActionEvent e) {
		Show a = new Show();

		if (false) {
			ShowRepository r;
			try {
				r = new ShowRepository();
			} catch (Exception e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			r.store(a);
		}

	}

}